package com.device_manager.mapper;

import com.device_manager.entity.Box;
import com.device_manager.entity.Device;
import com.device_manager.entity.ReturnRecord;
import org.apache.ibatis.annotations.Mapper;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

@Mapper
public interface ReturnMapper {
    void addReturn(ReturnRecord record);
    /**
     * 插入设备退货人信息，以及货物状态
     * @param returnDevice
     */
    void updateDevice(Device returnDevice);

    /**
     * 更新箱子状态
     * @param returnBoxFlag
     */
    void updateBox(Box returnBoxFlag);



    String selectDeviceMac(String deviceMac);

    String selectBoxFlag(String boxNumber);
    //批量查询设备对应的箱码

    void batchUpdateBoxFlags(Map<String, String> boxFlagsToUpdate);


    String selectBoxNumberByDeviceMac(String deviceMac);

    Integer selectTotalDeviceCountByBoxNumber(String boxNumber);

    boolean selectINDeviceMac(String deviceMac);

    boolean selectINBoxNumber(String boxNumber);
}
